Using the User-Defined Functions

From Crystal Reports:

  1. Create a new report and add tables to the report, or open an existing report.
  2. From the Insert menu, choose Formula Field. The Insert Field dialog box appears.
  3. Click New, and enter a name for the new formula in the Formula Name dialog box.
  4. Click OK; the Formula Editor appears.
  5. Scroll down in the Functions list box to the Additional Functions section. Locate the User Defined Function you created.

    User-Defined Function names for functions created in Automation Servers are prefixed according to the project and class name used when you created the Automation Server. For instance, if you named your project CRUFLProject, named the class Conversion, and named the function Square, the User-Defined Function would appear in the Formula Editor as ProjectConversionSquare.

  6. Double-click the User-Defined Function, and it appears in the Formula text box. Enter valid arguments for the function. For example:

    ProjectConversionSquare(5)

  7. Click Check. Make sure no errors appear in the function.
  8. Click Accept, and place the formula in your report. Preview the report and verify that the function worked correctly.

Congratulations, you just created and used a User-Defined Function.



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com